<template>
  <div class="Mine">
    <img src="//m.360buyimg.com/mobilecms/s750x366_jfs/t1/39350/14/2577/399090/5cc15c92Ec23fca90/6ea3cdf16875554d.jpg!cr_1125x549_0_72!q70.jpg.dpg"
         alt=""
         class="banner">
    <ul>
      <li v-for="(info, index) in infolist"
          :key="index"
          @click="exit(info)">
        <div class="content">
          <span>{{info.label}}</span>
          <i class="cubeic-arrow"></i>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data () {
    return {
      infolist: [
        {
          label: '商品收藏'
        },
        {
          label: '我的足迹'
        },
        {
          label: '店铺收藏'
        },
        {
          label: '我的订单'
        },
        {
          label: '退出',
          type: 'exit'
        }
      ]
    }
  },
  methods: {
    exit (info) {
      if (info.type === 'exit') {
        this.$store.commit('settoken', '')
        localStorage.removeItem('token')
        this.$router.push({ path: '/login' })
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.Mine {
  .banner {
    width: 100%;
  }
  li {
    height: 50px;
    line-height: 50px;
    border-bottom: 1px solid #eee;
    .content {
      display: flex;
      justify-content: space-between;
      align-items: center;
      span {
        margin-left: 20px;
        font-size: 15px;
      }
      i {
        margin-right: 20px;
        font-size: 20px;
      }
    }
  }
}
</style>
